// 此页规范将要处理数据的类型和调用方法
import store from './index'
const actionCreators = {
  //新增或修改 传对象
  changeData(data) {
     //需要定义一个具有特殊标识的action对象
    let action = {
      type: "modify",
      data: data
    }
    //需要将action对象派发给reducer
    store.dispatch(action)
  },
  //删除 传key值
  removeData(data) {
    let action = {
      type: "remove",
      data: data
    }
    store.dispatch(action)
  },
  //替换 传值随意
  replace(data){
    let action = {
      type:'replace',
      data:data
    }
    store.dispatch(action);
  }
}
export default actionCreators